<?php

namespace App\Http\Controllers;

use App\JkblTimingConfig;
use Illuminate\Http\Request;

/**
 * Class JkblTimingConfigController
 * @package App\Http\Controllers
 */
class JkblTimingConfigController extends Controller
{
    /**
     * JkblTimingConfigController constructor.
     */
    public function __construct()
    {
        $this->middleware('auth');
    }

    public function config(Request $request)
    {
        $config = JkblTimingConfig::find(1);
        if ($request->isMethod('post')) {
            return JkblTimingConfig::ConfigModify($config, $request);
        }
        return view('jkblTimingConfig.config')->with(compact('config'));
    }
}
